/* cache.c : BUFFER CACHE implementation */

#include "devices/block.h"
#include "threads/vaddr.h"
#include "filesys/filesys.h"

#define CACHE_EXTENT 64
#define BLOCKS_PER_PAGE (PGSIZE / BLOCK_SECTOR_SIZE)
#define INVALID_SECTOR_IDX (block_sector_t) -1

/* Function prototypes */
void cache_init (void);
void cache_read (block_sector_t, void *, size_t, size_t);
void cache_write (block_sector_t, void *, size_t, size_t);
void cache_flush (void);
